<#if !startVisitDate?has_content>
    <#assign startVisitDate=(.now?long-7*24*3600*1000)?number_to_date/>
</#if>
<@visit.itemList startVisitDate=startVisitDate endVisitDate=endVisitDate itemType=itemType itemId=itemId pageIndex=pageNum pageSize=numPerPage>
<div class="pageHeader card">
    <form class="pagerForm" autocomplete="off" onsubmit="return navTabSearch(this);" method="post">
        <#include "../include_page/parameters.html"/>
        <div class="searchBar">
            <ul class="searchContent">
                <li>
                    <label><@t.page 'visit.visit_date'/>:</label>
                    <input type="text" name="startVisitDate" class="date" size="10" dateFmt="yyyy-MM-dd" maxDate="{%y}-%M-{%d}" value="${startVisitDate!}"/>
                    <a class="inputDateButton" href="javascript:void(0);"></a>
                    <span>-</span>
                    <input type="text" name="endVisitDate" class="date" size="10" dateFmt="yyyy-MM-dd" maxDate="{%y}-%M-{%d+1}" value="${endVisitDate!}"/>
                    <a class="inputDateButton" href="javascript:void(0);"></a>
                </li>
                <li>
                    <label><@t.page 'item_type'/>:</label>
                    <input type="text" name="itemType" value="${itemType!}"/>
                </li>
                <li>
                    <label><@t.page 'visit.item'/>:</label>
                    <input type="text" name="itemId" value="${itemId!}"/>
                </li>
            </ul>
            <div class="subBar">
                <ul>
                    <li>
                        <button type="submit" class="buttonActive"><@t.page 'button.search'/></button>
                    </li>
                </ul>
            </div>
        </div>
    </form>
</div>
<div class="card">
    <div class="panelBar">
        <ul class="toolBar">
        </ul>
    </div>
    <table class="table" width="100%" layoutH>
        <thead>
            <tr>
                <th><@t.page 'visit.visit_date'/></th>
                <th><@t.page 'item_type'/></th>
                <th><@t.page 'visit.item'/></th>
                <th>PV</th>
                <th>UV</th>
                <th>IP Views</th>
            </tr>
        </thead>
        <tbody>
            <#list page.list as a>
            <tr>
                <td><a href="visit/history.html?startCreateDate=${a.id.visitDate!}" target="navTab" rel="visit/history" title="<@t.page 'visit.history'/>" icon="<i class='icon-bolt icon-large'></i>">${a.id.visitDate?date}</a></td>
                <td>${a.id.itemType!}</td>
                <td>
                    ${a.id.itemId!}
                    <#if a.id.itemType?has_content>
                        <#if a.id.itemType="category">
                            :<@cms.category id=a.id.itemId><a href="${object.url}" target="_blank">${object.name}</a></@cms.category>
                        <#elseif a.id.itemType="content">
                            :<@cms.content id=a.id.itemId><a href="${object.url}" target="_blank">${object.title}</a></@cms.content>
                        <#elseif a.id.itemType="user">
                            :<@sys.user id=a.id.itemId>${object.nickname}</@sys.user>
                        </#if>
                    </#if>
                </td>
                <td class="center">${a.pv!}</td>
                <td class="center">${a.uv!}</td>
                <td class="center">${a.ipviews!}</td>
            </tr>
            </#list>
        </tbody>
    </table>
    <#include "../include_page/page.html"/>
</div>
</@visit.itemList>